var path = require('path');

//日志根目录
var baseLogPath = path.resolve(__dirname, '../logs')

//响应日志目录
var responsePath = "/response";
//响应日志文件名
var responseFileName = "response";
//响应日志输出完整路径
var responseLogPath = baseLogPath + responsePath + "/" + responseFileName;
// var responseLogPath = path.resolve(__dirname, "../logs/response/response");

//错误日志目录
var errorPath = "/error";
//错误日志文件名
var errorFileName = "error";
//错误日志输出完整路径
var errorLogPath = baseLogPath + errorPath + "/" + errorFileName;
// var errorLogPath = path.resolve(__dirname, "../logs/error/error");


module.exports = {
"appenders": {
	"rule-console" : {
	  "type": "console"
	},
	
    "rule-response": {
      "type": "dateFile",
      "filename": responseLogPath,
      "encoding": "utf-8",
      "maxLogSize": 1000000,
      "numBackups": 3,
      "pattern": "yyyy-MM-dd.log",
      "alwaysIncludePattern": true
    },

    "rule-error": {
      "type": "dateFile",
      "filename": errorLogPath,
      "encoding": "utf-8",
      "maxLogSize": 100000,
      "numBackups": 3,
      "pattern": "yyyy-MM-dd.log",
      "alwaysIncludePattern": true
    }

},
"categories": {

    "default": {
      "appenders": [
        "rule-console",
        "rule-response"
      ],
      "level": "debug"
    }

//  ,"http": {
//    "appenders": [
//      "rule-error"
//    ],
//    "level": "error"
//  }    
}

}

